// (c) 2007 Messaging Logic. All Rights Reserved.
package org.xi8ix.jms;

import javax.jms.TextMessage;
import javax.jms.JMSException;

/**
 * @author Iain Shigeoka
 */
public class JMSTextMessage extends JMSMessage implements TextMessage {

    private String text;

    public JMSTextMessage() {

    }

    public JMSTextMessage(String text) throws JMSException {
        setText(text);
    }

    public JMSTextMessage(JMSTextMessage message) throws JMSException {
        super(message);
        this.text = message.text;
    }

    public void setText(String text) throws JMSException {
        this.text = text;
    }

    public String getText() throws JMSException {
        return text;
    }
}
